package com.zygh.lz.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.github.pagehelper.PageInfo;
import com.zygh.lz.entity.Register;
import com.zygh.lz.entity.Role;
import com.zygh.lz.entity.Staff;
import com.zygh.lz.entity.Xarea;
import com.zygh.lz.entity.remould.Matching;
import com.zygh.lz.entity.role.SysMenu;
import com.zygh.lz.vo.ResultBean;
import com.zygh.lz.vo.ResultBeans;
import com.zygh.lz.vo.RoleUserVo;

import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.io.IOException;
import java.util.List;
import java.util.Map;

public interface StaffService extends IService<Staff> {
    //登录
    ResultBean selectByLogin(String staff_tel, String staff_password);

    //注册
    ResultBean register(Staff staff);

    //校验用户是否存在
    ResultBean usercheck(String name);

    //根据id修改
    ResultBeans updaStaffInfoById(Staff staff);

    ResultBean updaStaffInfo(Staff staff);

    //删除
    ResultBean delStaffInfoById(Integer id);


    //手机端登录
    ResultBean appLogin(String policeId);

    //手机端登出
    ResultBean appLoginOut(String IMEI, String user);

    //修改唯一标识
    ResultBean updateRegiser(Register register);

    //默认人
    ResultBeans selectdefault(String probleDetail);

    //修改密码
    ResultBean modifuByPass(Staff staff);

    ResultBean selectStaffBySectionName(Integer staffid);

    //查询区域里的所有警员信息
    ResultBean selectStaffInfo();

    //查询在岗人数
    ResultBean selectStaffByzg(Integer sectionId, Integer sectionPid, String sectionName);

    //根据名字模糊查询
    ResultBean selectStaffByName(String Name, String staffHierarchy);

    //根据职位判断看的在线人数
    ResultBean selectStaffInfoByid(Integer id);

    ResultBean selectStaffZx(Integer id);

    ResultBean selectStaffYdByAll(String changeShifts, Integer SectionId);

    //查询所有在线民警，并把该民警岗位带出
    ResultBean selectpoliceZx(String station) throws Exception;

    ResultBean selectStaffByid(Integer id);

    //根据id查询民警应巡查路段里程上班时长
    ResultBean selectStaffXareaByid(Integer id) throws Exception;

    //根据id查询民警应巡查路段
    ResultBean selectXareaByid(Integer id) throws Exception;

    //查询昨日总警力
    ResultBean selecttotalforces(String battalion);

    //按大队查询昨日总警力
    ResultBean selecttotalforceszr(String battalion);

    ResultBean selectzaBystation(String station, String conment, String grid, String battalion);

    //查询其他在线民警
    ResultBean selectStaffByqita();

    //以单位为结构显示信息列表
    ResultBean selectAllbytype(String battalion);


    //根据岗位查询各大队在线民警
    ResultBean selectcountBysection(Xarea xarea);


    //根据岗位查询各大队下各中队在线民警
    ResultBean selectcountBydetachment(Xarea xarea);

    /**
     * 对接市局接口  人员信息列表
     *
     * @return
     */
    ResultBean selectStaffByInfo();


    //特殊勤务当班在线警力
    ResultBean specialOn();

    //根据警号查询民警个人信息
    Staff selectStaffByNum(String staffNum);

    ResultBean findStaffByid(Integer id);

    ResultBean findStaffByWarningSignal(Integer sectionId, String warningSignal);


    Staff selectByPrimaryKey(Integer sysStaffId);

    Map selectStaffInfoById(Integer sysStaffId);

    List<Staff> selectStaffBySectionID(Integer sys_section_id);

    /**
     * 新增人员
     *
     * @param staff 封装人员的参数
     * @return ResultBean
     */
    ResultBean addStaff(Staff staff);

    /**
     * 更新人员
     *
     * @param staff 封装人员的参数
     * @return ResultBean
     */
    ResultBean updateStaff(Staff staff);

    /**
     * 批量新增人员
     *
     * @param staff 封装人员的参数
     * @return ResultBean
     */
    ResultBean addAllStaff(List<Staff> staff);

    ResultBean OnlineDetails(String station, String battalion);


    List<Map> findStaffInfoByAll(String staffName, String warningsignal, Integer sectionid, String staffType);

    PageInfo<Map> findStaffInfoByPage(String staffName, String warningsignal, Integer sectionid, String staffType, int pageNum, int pageSize);

    /**
     * 根据大队、中队、民警辅警、在线/不在线、岗位
     *
     * @param matching 入参
     * @return ResultBean
     */
    ResultBean selectStaffMatching(Matching matching);

    ResultBean selectStaffOnLine(Matching matching, Integer current, Integer size)  ;

    String exportStaffOnLine(HttpServletResponse response, Matching matching) throws IOException;

    ResultBean selectCommandCenter();


    Staff getByUsername(String username);

    ResultBean roleUser(RoleUserVo role);
}
